/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.xtd.facade.admin;

import com.xtd.facade.AbstractFacade;
import com.xtd.model.admin.SystemProperty;
import javax.ejb.Stateless;

/**
 *
 * @author Lu Yuanbin
 */
@Stateless
public class SystemPropertyFacade extends AbstractFacade<SystemProperty> {

    public SystemPropertyFacade() {
        super(SystemProperty.class);
    }

    public String getSystemPropertyValue(String name) {
        return (String) getEntityManager().createQuery("select sp.value from SystemProperty as sp where sp.name = :name").setParameter("name", name).getSingleResult();
    }
}
